<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta author="tianjindong.cn 田金东">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>“${tag.tagname }”标签</title>
<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/css/nprogress.css">
<link rel="stylesheet" type="text/css" href="/css/style.css">
<link rel="stylesheet" type="text/css" href="/css/font-awesome.min.css">
<link rel="apple-touch-icon-precomposed" href="/images/icon/icon.png">
<link rel="shortcut icon" href="/images/icon/favicon.ico">
<script src="/js/jquery-2.1.4.min.js"></script>
<script src="/js/nprogress.js"></script>
<script src="/js/jquery.lazyload.min.js"></script>
</head>

<body class="user-select">
	<jsp:include page="common/top.jsp" />
	<section class="container">
	<div class="content-wrap">
		<div class="content">
			<div class="title">
				<h3>“${tag.tagname }”标签</h3>
			</div>
			<c:if test="${pageView.totalItem==0 }">
				<div class="panel panel-default">
					<div class="panel-body" align="center">噢噢，《${tag.tagname }》标签还没有关联的文章，敬请期待吧！</div>
				</div>
			</c:if>
			<c:forEach items="${pageView.items }" var="item">
				<article class="excerpt excerpt-1" style="cursor:pointer;" onclick="window.location.href='/article/${item.category.alias }/${item.id}.html'"> <a class="focus" href="#" title=""></a> <header> <a class="cat" href="/article/${item.category.alias }/${item.id}.html">
					${item.category.name }
					<i></i>
				</a>
				<h2>
					<a href="/article/${item.category.alias }/${item.id}.html" title="">${item.briefTitle30 }</a>
				</h2>
				</header>
				<p class="meta">
					<time class="time"> <i class="glyphicon glyphicon-time"></i> ${item.stringUpdatetime}</time>
					<span class="views">
						<i class="glyphicon glyphicon-eye-open"></i>
						共${item.visitNum }人围观
					</span>
					<a class="comment" href="/article/${item.category.alias }/${item.id}.html">
						<i class="glyphicon glyphicon-comment"></i>
						${item.commentNum }个不明物体
					</a>
				</p>
				<p class="note" style="cursor: pointer;">${item.summary }</p>
				</article>
			</c:forEach>
			<div class="quotes">
				<c:choose>
					<c:when test="${pageView.currentPage==1 }">
						<span class="disabled">首页</span>
						<span class="disabled">上一页</span>
					</c:when>
					<c:otherwise>
						<span style="cursor: pointer;"
							onclick="window.location.href='${pageContext.request.contextPath}/tag-article/${tag.id}.html?currentPage=1&countItem=${pageView.countItem }'">首页</span>
						<span style="cursor: pointer;"
							onclick="window.location.href='${pageContext.request.contextPath}/tag-article/${tag.id}.html?currentPage=${pageView.currentPage-1 }&countItem=${pageView.countItem }'">上一页</span>
					</c:otherwise>
				</c:choose>
				<c:forEach begin="1" end="${pageView.countPage }" var="i">
					<c:choose>
						<c:when test="${pageView.currentPage==i }">
							<a class="current">${i }</a>
						</c:when>
						<c:otherwise>
							<a href="${pageContext.request.contextPath}/tag-article/${tag.id}.html?currentPage=${i}&countItem=${pageView.countItem }">${i }</a>
						</c:otherwise>
					</c:choose>
				</c:forEach>
				<c:choose>
					<c:when test="${pageView.currentPage<pageView.countPage}">
						<span style="cursor: pointer;"
							onclick="window.location.href='${pageContext.request.contextPath}/tag-article/${tag.id}.html?currentPage=${pageView.currentPage+1 }&countItem=${pageView.countItem }'">下一页</span>
						<span style="cursor: pointer;"
							onclick="window.location.href='${pageContext.request.contextPath}/tag-article/${tag.id}.html?currentPage=${pageView.countPage }&countItem=${pageView.countItem }'">尾页</span>
					</c:when>
					<c:otherwise>
						<span class="disabled">下一页</span>
						<span class="disabled">尾页</span>
					</c:otherwise>
				</c:choose>
			</div>
		</div>
	</div>
	<jsp:include page="common/right.jsp" /> </section>
	<jsp:include page="common/footer.jsp" />
	<script src="/js/bootstrap.min.js"></script>
	<script src="/js/jquery.ias.js"></script>
	<script src="/js/scripts.js"></script>
	<script src="/js/console.js"></script>
</body>
</html>